<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title>修改手机</title>
		<link rel="stylesheet" type="text/css" href="../css/adduser.css"/>
	</head>
	<body>
		<div class="bg">
			<div class="logo lfet"></div>
			<div class="font lfet">
				修改手机>>>
			</div>
			<div class="wizard right">
<%--				暂时写到修改--%>
				<form action="${pageContext.request.contextPath}/phone/updatePhone.do">
		            <div class="content">
		            	<div class="col">
		                    <div class="form-group">
		                  		<label class="lfet">手机名称:</label>
		                    	<input name="name" type="text" value="${phone.name}" class="form-control error inp-bg1 left" value="" style="outline:none;"/>
								<input type="hidden" name="id" value="${phone.id}"/>
		                 	</div>
		            	    <div class="form-group">
			                    <label style="text-align: left;">是否有货:</label>
			                    <input type="radio" style="outline:none;" value="1" name="state"
									   <c:if test="${phone.state==1}">
									   checked="checked"
										</c:if>
								/><span>有货</span>
			               		<input type="radio" style="outline:none;" value="0" name="state"
								<c:if test="${phone.state==0}">
									   checked="checked"
								</c:if>
								/><span>无货</span>
		                	</div>
		                	<div class="form-group">
		                    	<label class="lfet">价格:</label>
		                    	<input type="text" name="price" value="${phone.price}" class="form-control error dh" style="outline:none;">
		                	</div>
			                <div class="form-group">
		                    	<label class="lfet">品牌:</label>
		                    	<select  name="bid" class="form-control error map" style="outline:none;height: 30px;width: 300px;" >
		                    		<c:forEach items="${requestScope.brands}" var="brand">
										<option <c:if test="${brand.bid==phone.bid}">
											selected="selected"
<%--		选项后台实际值就是bid，想要显示效果为华为，然后华为的bid是1，value就是华为的bid，o
ption尖括号之间的是我的选项想显示出的文字，1.下拉框1234 给的bid，没有指明让它显示什么	--%>
										</c:if> value="${brand.bid}">${brand.bname}
										</option>
									</c:forEach>
								</select>
							<%--<c:forEach items="${requestScope.brandMap}" var="entry">
								<option
								用来判断当下选项是否是要修改选项的相同品牌
								<c:if test="${entry.key==phone.bid}">
									selected="selected" 确定是否默认选中
								</c:if>
								value="${entry.key}">${entry.value}</option>
							</c:forEach>--%>

		                	</div>
			                <div class="bottom" style="text-align: center;">
								<!-- 这个button也可以提交表单，不需要改成submit -->
			                	<button style="text-align: center;">提 交</button>
			                </div>
			            </div>
		            </div>
				</form>
	        </div>
	    </div>
	</body>
</html>
